package com.cloudpolice.weixin.dao;

import com.cloudpolice.weixin.model.InPutParam.WechatInsertInParam;
import com.cloudpolice.weixin.model.InPutParam.WechatSelectInParam;
import com.cloudpolice.weixin.model.WechatModel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：flyman5，前端工程师：孙耀
 * @create 2020-02-20 16:47
 * @function
 * @editLog
 */
@Mapper
public interface WechatMapper {
    /**
     * 根据AppId、openId、Mobile，得到个人ID
     *
     * @param wechatInsertInParam 输入参数
     * @return 微信小程序信息
     */
    WechatInsertInParam SelectWeiXinInfoByMobile(WechatInsertInParam wechatInsertInParam);


    /**
     * 根据个人ID与与OpenId关联
     *
     * @param wechatInsertInParam com.cloudpolice.weixin.model.InPutParam.WechatInsertInParam
     * @return 微信小程序信息
     */
    int updateWechatPerson(WechatInsertInParam wechatInsertInParam);
    /**
     * 根据个人ID与人员类型，得到微信小程序信息
     *
     * @param wechatInsertInParam com.cloudpolice.weixin.model.InPutParam.WechatInsertInParam
     * @return 微信小程序信息
     */
    int updateWechat(WechatInsertInParam wechatInsertInParam);

    /**
     * 根据个人ID与人员类型，得到微信小程序信息
     *
     * @param wechatInsertInParam com.cloudpolice.weixin.model.InPutParam.WechatInsertInParam
     * @return 微信小程序信息
     */
    int insertIntoWechat(WechatInsertInParam wechatInsertInParam);

    /**
     * 根据个人ID与人员类型，得到微信小程序信息
     *
     * @param wechatInsertInParam com.cloudpolice.weixin.model.InPutParam.WechatInsertInParam
     * @return 微信小程序信息
     */
    int insertIntoWechatBeforeCheck(WechatInsertInParam wechatInsertInParam);

    /**
     * 根据个人ID与人员类型，得到微信小程序信息
     *
     * @param wechatSelectInParam 输入参数
     * @return 微信小程序信息
     */
    List<WechatModel> SelectWeiXinInfoByPersonId(WechatSelectInParam wechatSelectInParam);
}
